package com.boot;

import org.springframework.boot.SpringApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.ComponentScan;

/**
 * @author
 * @date 2025-07-29
 * @Description
 */
@ComponentScan
public class MainApplication {
    public static void main(String[] args) {
        //启动spring框架，必须指定一个配置 （配置类）
        ApplicationContext run = SpringApplication.run(MainApplication.class);


        UserController bean = run.getBean(UserController.class);
        bean.test();
    }
}
